package com.javandad.app.server.mail;

import javax.mail.MessagingException;
import javax.mail.NoSuchProviderException;
import javax.mail.Transport;

import com.javandad.app.server.mail.entity.JMail;

public class MailHandler {

	public static boolean sendMail(JMail mail) {

		try {
			Transport.send(mail);
			return true;
		} catch (NoSuchProviderException e) {
			e.printStackTrace();
		} catch (MessagingException e) {
			e.printStackTrace();
		}

		return false;
	}

}
